﻿@{
	Layout = null;
}
<link href="~/libs/layui-v2.9.21/layui-v2.9.21/layui/css/layui.css" rel="stylesheet" />

<div style="padding: 16px;">
	<table class="layui-hide" lay-filter="test" id="ID-table-demo-page"></table>
</div>

<script src="~/libs/jquery/jquery.js"></script>
<script src="~/libs/layui-v2.9.21/layui-v2.9.21/layui/layui.js"></script>


<script>

	layui.use('table', function(){
	  var table = layui.table;

		function initTable(){
			table.render({
			  elem: '#ID-table-demo-page',
			  url:'/SupplierReturn/GetSupplierReturnList', // 此处为静态模拟数据，实际使用时需换成真实接口
			  page:true,
			  limit:10,
			  limits:[10,15,20],
			  cols: [[
			  //	{ type: 'checkbox', fixed: 'left' },
				  {field: 'returnCode', title: '退货单编码'},
				  {field: 'returnName', title: '退货单名称'},
				  {field: 'purchaseCode', title: '采购订单编码'},
				  {field: 'returnDate', title: '退货日期'},
				  {field: 'dstatus', title: '单据状态',
				  templet: function (d)
				  {
					  return d.state ===1? "已完成" : "未完成"
				  }},
				  { field:'操作',title: '操作', width: 160,toolbar:'#operateBtn' }
			  ]],
			  parseData:function(res){
				console.log(res)
			  },
			  done: function (res, curr, count) {
				console.log(res.data);
			  }
			});
		}

	initTable();
	})
</script>

